package com.example.asus.drawstudy;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.widget.Button;

import com.example.asus.drawstudy.activtiy.AcrProgressActivity;
import com.example.asus.drawstudy.activtiy.BarActivity;
import com.example.asus.drawstudy.activtiy.BarSportActivity;
import com.example.asus.drawstudy.activtiy.ProgressViewActivity;
import com.example.asus.drawstudy.activtiy.TextViewActivity;
import com.example.asus.drawstudy.activtiy.WaterShaderActivity;
import com.example.asus.drawstudy.activtiy.YuanShaderActivity;

public class MainActivity extends AppCompatActivity {

    private Button yuanBtn;
    private Button waterBtn;
    private Button labelBtn;
    private Button seekBtn;
    private Button arcBtn;
    private Button btnBar;
    private Button btnBar2;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        setContentView(R.layout.activity_main);
        yuanBtn = findViewById(R.id.btn_yuan);
        waterBtn = findViewById(R.id.btn_water);
        labelBtn = findViewById(R.id.btn_label);
        seekBtn = findViewById(R.id.btn_seek);
        arcBtn = findViewById(R.id.btn_arc);
        btnBar = findViewById(R.id.btn_bar);
        btnBar2 = findViewById(R.id.btn_bar2);
        yuanBtn.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(MainActivity.this, YuanShaderActivity.class);
                startActivity(intent);
            }
        });
        waterBtn.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(MainActivity.this, WaterShaderActivity.class);
                startActivity(intent);
            }
        });
        labelBtn.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(MainActivity.this, TextViewActivity.class);
                startActivity(intent);
            }
        });
        seekBtn.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(MainActivity.this, ProgressViewActivity.class);
                startActivity(intent);
            }
        });
        arcBtn.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(MainActivity.this, AcrProgressActivity.class);
                startActivity(intent);
            }
        });
        btnBar.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(MainActivity.this, BarActivity.class);
                startActivity(intent);
            }
        });
        btnBar2.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(MainActivity.this, BarSportActivity.class);
                startActivity(intent);
            }
        });
    }
}
